Skip to content

fix(ci): preserve bounded sidecar request ids - #2053

Merged
seonghobae merged 5 commits into
mainfrom
codex/preserve-sidecar-request-id
Sep 10, 2026
Merged

fix(ci): preserve bounded sidecar request ids#2053
seonghobae merged 5 commits into
mainfrom
codex/preserve-sidecar-request-id

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

요약

  • #1978의 bounded diagnostic compatibility 위에 request correlation을 비강제 스택했습니다.
  • provider 진단 7종과 오류 응답 request_failed에서 서버 생성 32자리 소문자 hex request_id를 보존합니다.
  • 성공 http_request는 review sidecar의 /healthz, /v1/chat/completions, /v1/responses만 method·status·latency·session hash·request ID 전체가 엄격히 맞을 때 보존합니다.
  • 요청 문맥 밖 provider 로그의 -와 선행 오류 요약의 <omitted>만 명시적 부재 표식으로 허용합니다.
  • 길이·문자셋이 다른 값, 임의 경로, 뒤따르는 자유 텍스트와 줄바꿈 주입은 거부하며 provider error_message<omitted>로만 남깁니다.

exact-head 검증

  • head: 4a0125bf9f50d4d26355249011df03c3735b3abc
  • 전체 runtime-preflight 파일: 일반 환경 135개, Actions 환경 135개 통과
  • sidecar 선택 검사: 44개 통과
  • sanitizer coverage: statements 110/110, branches 52/52, 100%
  • git diff --check: 통과

스택 경계

Summary by CodeRabbit

  • 개선 사항
    • 사이드카 진단 로그에서 허용된 형식의 요청 ID와 세션 식별자만 보존합니다.
    • 잘못된 형식, 대문자, 길이 초과 또는 경계가 불명확한 식별자는 자동으로 제외됩니다.
    • 공급자 오류 세부 정보는 제한적으로 처리되며, 민감한 내용은 생략 표시로 대체됩니다.
    • HTTP 성공 상관관계는 지정된 리뷰 사이드카 경로에서만 유지됩니다.
    • 요청 실패 및 제공자 호출 이벤트의 로그 일관성과 검증 범위가 강화되었습니다.

Retain only exact 32-character lowercase hexadecimal request identifiers on provider attempt, backoff, and failed diagnostics while continuing to omit raw provider error text.

Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Seongho Bae <me@seonghobae.me>
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 51a56b4b-a691-4923-9bc6-3fce81dc32f3

📥 Commits

Reviewing files that changed from the base of the PR and between 7b16449 and 4a0125b.

📒 Files selected for processing (4)
  • AGENTS.md
  • CLAUDE.md
  • scripts/ci/sanitize_contextual_orchestrator_sidecar_stream.py
  • tests/test_contextual_orchestrator_review_runtime_preflight.py

📝 Walkthrough

Walkthrough

사이드카 로그 정제기가 제한된 request_id, session_id_hash, HTTP 필드와 공급자 이벤트를 처리합니다. 잘못된 식별자와 비허용 경로를 거부하며, 관련 운영 지침과 회귀 테스트를 추가합니다.

Changes

사이드카 로그 위생 처리

Layer / File(s) Summary
로그 정제 규칙과 파싱 경로
scripts/ci/sanitize_contextual_orchestrator_sidecar_stream.py
sanitize_line이 제한된 HTTP 필드와 공급자 이벤트를 파싱합니다. 유효한 32자 소문자 hexadecimal request_id만 보존합니다.
위생 처리 계약과 회귀 검증
AGENTS.md, CLAUDE.md, tests/test_contextual_orchestrator_review_runtime_preflight.py
허용된 진단 범위와 고정 경로를 문서화합니다. 유효한 식별자 보존과 잘못된 형식 거부를 검증합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SidecarStream as Sidecar stream
  participant SanitizeLine as sanitize_line
  participant SanitizedOutput as Sanitized output
  SidecarStream->>SanitizeLine: http_request 또는 route event 전달
  SanitizeLine->>SanitizedOutput: 허용 필드와 유효한 request_id 반환
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/preserve-sidecar-request-id

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae changed the base branch from main to codex/sidecar-diagnostic-compat September 9, 2026 04:10
seonghobae added a commit that referenced this pull request Sep 10, 2026
Explicit user-authorized bypass for contextual-orchestrator incident recovery. Full three-file diff reviewed at 3431353; zero inline review threads. Exact-head Python Security 34310169116, SAST 34310169148, CodeQL 34310169106 and Security Scan 34310169250 are success. Preserve legacy log forms and omit provider response bodies, credentials and free-form messages; validate typed provider status/request IDs and reject multiline/partial tokens. Prerequisite for #2053 and merged contextual-orchestrator#1105 producer compatibility. No independent-approval or complete live-runtime-recovery claim. No scanner, ruleset or status modifications.
Base automatically changed from codex/sidecar-diagnostic-compat to main September 10, 2026 00:02
@seonghobae
seonghobae marked this pull request as ready for review September 10, 2026 00:03
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@seonghobae
seonghobae merged commit f578d8d into main Sep 10, 2026
41 of 55 checks passed
@seonghobae
seonghobae deleted the codex/preserve-sidecar-request-id branch September 10, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant